<script setup>
import { ArrowDown } from '@element-plus/icons-vue'

</script>

<template>
  <div class="common-layout">
    <el-container class="container">
      <el-header>
        <div class="header">
          <div class="affix-container">
            <el-affix>
              <h2>Pigeon</h2>
            </el-affix>
          </div>
          <div class="affix-container">
            <el-affix target=".affix-container" :offset="80">
              <el-dropdown>
              <span class="el-dropdown-link">
                菜单
                <el-icon class="el-icon--right">
                  <arrow-down/>
                </el-icon>
              </span>
                <template #dropdown>
                  <el-dropdown-menu>
                    <RouterLink to="/"><el-dropdown-item>推送消息</el-dropdown-item></RouterLink>
                    <RouterLink to="/settings"><el-dropdown-item>设置</el-dropdown-item></RouterLink>
                  </el-dropdown-menu>
                </template>
              </el-dropdown>
            </el-affix>
          </div>
        </div>
        <hr class="splitLine">
      </el-header>

      <el-main class="main">
        <RouterView></RouterView>
      </el-main>
    </el-container>
  </div>
</template>

<style scoped>
html body {
  height: content-box;
}

.container {
  height: 100vh;
}

.header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.main {
}

.affix-container {
  text-align: center;
  border-radius: 4px;
}

.el-dropdown-link {
  cursor: pointer;
  color: var(--el-color-primary);
  display: flex;
  align-items: center;
}
.splitLine{
  color: #888888;
}
</style>
